<!DOCTYPE html>
<html class="x-admin-sm">

<head>
	<meta charset="UTF-8">
	<title>电子学会比赛管理系统</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
	<link rel="stylesheet" href="./css/font.css">
	<link rel="stylesheet" href="./css/common.css">
	<link rel="stylesheet" href="./css/xadmin.css">
	<script type="text/javascript" src="./js/abkj/match/api/signview.js"></script>
	<script type="text/javascript" src="./js/abkj/ext/signExt.js"></script>
	<script type="text/javascript" src="./js/abkj/slAjax.js"></script>
	<script type="text/javascript" src="./js/abkj/fun_tool.js"></script>
	<script src="./lib/layui/layui.js" charset="utf-8"></script>
	<script type="text/javascript" src="./js/xadmin.js"></script>
</head>

<body>
<div class="x-nav">
	<span class="layui-breadcrumb">
			<a href="">首页</a>
			<a><cite>晋级管理</cite></a>
			<a><cite>晋级详情</cite></a>
	</span>
	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
		<i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
	</a>
</div>
<div class="layui-fluid">
	<div class="layui-row layui-col-space15">
		<div class="layui-col-md12">
			<div class="layui-card">
				<div class="layui-card-header">
					<!--<button class="layui-btn layui-btn-danger" onclick="delAll()">-->
						<!--<i class="layui-icon"></i>批量删除-->
					<!--</button>-->
					<!--<button class="layui-btn" onclick="xadmin.open('添加用户','order-add.html',800,600)">-->
						<!--<i class="layui-icon"></i>添加-->
					<!--</button>-->
				</div>
				<div class="layui-card-body" id="content" v-cloak>
					<table class="layui-table layui-form" id="table" lay-filter="test">
						<div class="layui-btn-container">
							<button class="layui-btn layui-btn-sm">导出</button>
						</div>
					</table>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
<script src="./js/vue.js"></script>
<script>
	var app=new Vue({
		el: '#content',
		data: {
			list:[],
			aaa: 123,
			status:['审核','待审核' ,'通过', '不通过'],
			participate:['审核','参赛' ,'弃权' ],
			cols: [
				{type: 'checkbox', fixed: 'left'},
				{field: 'id', title: '序号'},
				{field: 'teamName', title: '团队ID'},
			]
		},
		methods:{
			opentab:function(name,url){
				//单击事件
				console.log(name)
				console.log(url)
				xadmin.add_tab(name,url)
			},
			getData(){
				var funTool = fun_tool();

				var varmatchId = funTool.getUrlParam("matchId");
				var varzoneId = funTool.getUrlParam("zoneId");
				var varscheduleId = funTool.getUrlParam("scheduleId");
				var vargroupId = funTool.getUrlParam("groupId");
				var reqParam={
					page:{
						current:1,
						size:10
					},
					cond:{
						eq:{
							zoneId:varzoneId,
							matchId:varmatchId,
							scheduleId:varscheduleId,
							groupId:vargroupId
						},
						groupby:["id"]
					}
				}
				SignViewPageList(reqParam,function(data){
					app.list=data.records;
					for(var i=0;i<app.list.length;++i){
						app.list[i].index= i+ 1 + (data.current - 1) * data.size
					}
					app.init()
				})
				
			},
			init:function() {
				var that = this.layui.use(['laypage','table'], function () {
					// var laypage = layui.laypage;
					// //执行一个laypage实例
					// laypage.render({
					// 	elem: 'test1' //注意，这里的 test1 是 ID，不用加 # 号
					// 	,count: 16 //数据总数，从服务端得到
					// });
					var table = layui.table
					//头工具栏事件
					table.render({
						elem: '#table',
						url:'',
						title: '用户数据表',
						cols: [that.cols],
						page: true,
						data: that.list
					})
				})
			}
		}
	})
	window.onload=function(){
		app.getData()
	}
</script>
<script src="./js/jquery.min.js"></script>
<script type="text/html" id="works">
	<a href="javascript:;" class="layui-table-link">下载</a>
</script>
<script type="text/html" id="Preview">
	<a href="javascript:;" class="layui-table-link">下载</a>
</script>
<script type="text/html" id="operating">
	<a href="javascript:;" onclick="xadmin.open('裁判','viewReferee.html',600,400)" class="layui-table-link">查看裁判</a>
</script>
<script>
	$(function () {
		layui.use(['form', 'table'], function () {
			var form = layui.form
			// layer.msg('玩命卖萌中', function(){
			//   //关闭后的操作
			//   });
			//监听提交
			form.on('submit(sreach)', function (data) {
				console.log(data)
				// layer.msg(JSON.stringify(data.field), function () {
				// location.href = 'index.html'
				// })
				return false
			})
			var table = layui.table
			table.on('checkbox(test)', function(obj){ //
				console.log(obj.checked); //当前是否选中状态
				console.log(obj.data); //选中行的相关数据
				console.log(obj.type); //如果触发的是全选，则为：all，如果触发的是单选，则为：one
				console.log(table.checkStatus('test').data); // 获取表格中选中行的数据
				if (table.checkStatus('test').data.length === 0) {
					$("#referee").addClass('layui-btn-disabled')
				} else {
					$("#referee").removeClass('layui-btn-disabled')
				}

			});
		})
		/*用户-删除*/
		function member_del(obj, text, id) {
			layer.confirm( text,
				function (index) {
					//发异步删除数据
					$(obj).parents("tr").remove()
					layer.msg('操作成功!', {
						icon: 1,
						time: 1000
					})
				})
		}


	})
</script>

</html>
